<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>分类管理</title>
</head>
<body class="laytp-container">
<div class="layui-card" id="search-form" style="display:none;">
    <div class="layui-card-body">
        <form class="layui-form" lay-filter="layui-form">
            <div class="layui-form-item">
                <div class="layui-form-item layui-inline">
                    <label class="layui-form-label">ID</label>
                    <div class="layui-input-inline">
                        <input type="text" name="search_param[id][value]" class="layui-input" autocomplete="off" />
                        <input type="hidden" name="search_param[id][condition]" value="=">
                    </div>
                </div>
                <div class="layui-form-item layui-inline">
                    <label class="layui-form-label" title="职业">状态</label>
                    <div class="layui-input-inline">
                        <div class="xmSelect"
                             data-name="search_param[status][value]"
                             data-sourceType="data"
                             data-radio="true"
                             data-source="[{name:'正常',value:'1'},{name:'下架',value:'2'}]"
                             data-selected="{{=d.device}}"
                        ></div>
                        <input type="hidden" name="search_param[status][condition]" value="IN">
                    </div>
                </div>

                <div class="layui-form-item layui-inline" >
                    <label class="layui-form-label">
                        分类用途</label>
                    <div class="layui-input-inline">
                        <div class="xmSelect"
                             data-name="search_param[use_type][value]"
                             data-sourceType="route"
                             data-source="/admin.basic.category/type"
                             data-radio="true"
                             data-placeholder="请选择用途"
                             data-textField="name"
                             data-valueField="value"
                             data-paging="true"
                             data-direction="down"
                        ></div>
                    </div>
                    <input type="hidden" name="search_param[use_type][condition]" value="=">
                </div>

                <div class="layui-form-item layui-inline">
                    <label class="layui-form-label">分类名称</label>
                    <div class="layui-input-inline">
                        <input type="text" name="search_param[name][value]" class="layui-input" autocomplete="off" />
                        <input type="hidden" name="search_param[name][condition]" value="LIKE">
                    </div>
                </div>
                <div class="layui-form-item layui-inline">
                    <label class="layui-form-label">创建时间</label>
                    <div class="layui-input-inline">
                        <input type="text" class="layui-input laydate"
                               id="create_time" name="search_param[create_time][value]"
                               data-type="date" data-isRange="true" placeholder="请选择创建时间">
                        <input type="hidden" name="search_param[create_time][condition]" value="BETWEEN_DATETIME">
                    </div>
                </div>
                <div class="layui-form-item layui-inline">
                    <button class="laytp-btn laytp-btn-md laytp-btn-primary" lay-submit lay-filter="laytp-search-form">
                        <i class="layui-icon layui-icon-search"></i>
                        查询
                    </button>
                    <button type="reset" class="laytp-btn laytp-btn-md laytp-search-form-reset">
                        <i class="layui-icon layui-icon-refresh"></i>
                        重置
                    </button>
                </div>
            </div>
        </form>
    </div>
</div>
<div class="layui-card">
    <div class="layui-card-body">
        <table id="laytp-table" lay-filter="laytp-table"></table>
    </div>
</div>

<script type="text/html" id="default-toolbar">
    <div class="dropdown-menu">
        <button class="laytp-btn laytp-btn-primary laytp-btn-md">
            <i class="layui-icon layui-icon-triangle-d"></i>
            批量操作
        </button>
        <ul class="dropdown-menu-nav layui-anim-upbit dropdown-bottom-left layui-anim">
            <div class="dropdown-anchor"></div>
            {{# if(facade.hasAuth("/admin.basic.category/del?game_id="+facade.getUrlParam('game_id'))){ }}
            <li><a lay-event="del"><i class="layui-icon layui-icon-delete"></i>删除</a></li>
            {{# } }}
        </ul>
    </div>
    {{# if(facade.hasAuth("/admin.basic.category/add?game_id="+facade.getUrlParam('game_id'))){ }}
    <button class="laytp-btn laytp-btn-danger laytp-btn-md" lay-event="add">
        <i class="layui-icon layui-icon-add-1"></i>
        新增
    </button>
    {{# } }}
    <button class="laytp-btn laytp-btn-warming laytp-btn-md" lay-event="search">
        <i class="layui-icon layui-icon-search"></i>
        搜索
    </button>
    {{# if(facade.hasAuth("/admin.basic.category/recycle")){ }}
    <button class="laytp-btn laytp-btn-success laytp-btn-md" lay-event="recycle">
        <i class="layui-icon layui-icon-delete"></i>
        回收站
    </button>
    {{# } }}
    <button class="laytp-btn laytp-btn-normal laytp-btn-md" id="study" >
        <i class="layui-icon"></i>
        视频学习
    </button>
</script>

<script type="text/html" id="default-bar">
    {{# if(facade.hasAuth("/admin.basic.category/edit?game_id="+facade.getUrlParam('game_id'))){ }}
    <button class="laytp-btn laytp-btn-primary laytp-btn-xs" lay-event="edit"><i class="layui-icon layui-icon-edit"></i>编辑</button>
    {{# } }}
    {{# if(facade.hasAuth("/admin.basic.category/del?game_id="+facade.getUrlParam('game_id'))){ }}
    <button class="laytp-btn laytp-btn-danger laytp-btn-xs" lay-event="del"><i class="layui-icon layui-icon-delete"></i>删除</button>
    {{# } }}
</script>

<script>
    if(localStorage.getItem("staticDomain")){
        document.write("<link rel='stylesheet' href='" + localStorage.getItem("staticDomain") + "/component/layui/css/layui.css?v=" + localStorage.getItem("version") + "'>");
        document.write("<script src='" + localStorage.getItem("staticDomain") + "/component/layui/layui.js?v="+localStorage.getItem("version")+"'><\/script>");
        document.write("<script src='" + localStorage.getItem("staticDomain") + "/component/laytp/layuiConfig.js?v="+localStorage.getItem("version")+"'><\/script>");
        document.write("<script src='" + localStorage.getItem("staticDomain") + "/admin/js/basic/category.js?v="+localStorage.getItem("version")+"'><\/script>");
    }else{
        document.write("<link rel='stylesheet' href='/static/component/layui/css/layui.css?v=" + localStorage.getItem("version") + "'>");
        document.write("<script src='/static/component/layui/layui.js?v="+localStorage.getItem("version")+"'><\/script>");
        document.write("<script src='/static/component/laytp/layuiConfig.js?v="+localStorage.getItem("version")+"'><\/script>");
        document.write("<script src='/static/admin/js/basic/category.js?v="+localStorage.getItem("version")+"'><\/script>");
    }
</script>
</body>
</html>
